<?php

class module_u_core extends a_base_module
implements i_hook_pre_controller,
           i_hook_post_controller,
           i_hook_post_controller_constructor,
           i_hook_post_system,
           i_hook_base_controller_constructor{
 
    public function __construct($basic_info){
        parent::__construct($basic_info);
        ;
    }

    public function exe_pre_controller(){        
        Module_Extended::load_helper("debug", "core");        
        $this->ci()->current_module = current_module();
        $this->ci()->current_controller = current_controller();
        $this->ci()->load->helper("string");        
        $this->ci()->load->library("smarty_wrapper");        
        
        

        $current_site = service_l_core::get_current_site();
        if(!$this->is_admin() && !($this->ci()->current_controller==='console')){
            if($current_site->down_for_maintenance=="1" && !is_ignoring_maintenance()){
                ob_start();
                echo "<div ";
                echo       "style=\"background:none repeat scroll 0 0 #F5F8FA;
                            border:2px solid #D7E8F0;
                            color:#000000;
                            font-family:'Courier New',Courier,monospace;
                            font-size:12px;
                            line-height:14px;
                            padding:5px;
                            text-align:center;\"";
                echo        ">";
                debug_h( $current_site->down_time_msg,4);
                echo "</div>";
                $content = ob_get_contents();
                ob_clean();
                echo $content;
                exit();
            }
        }
    }
    
    public function exe_post_controller(){
       // trace();
    }

    public function exe_post_controller_constructor(){
       // trace();
    }

    public function exe_post_system(){
       // trace();
    }
    
    public function exe_base_controller_constructor(){        

    }
}